using System.Collections.Generic;
using GameFramework.Battle.Core;
using Gameplay.PVE.Config;
using Gameplay.PVE.Entity;
using Gameplay.PVE.Utils;
using UnityEngine;
using Yoozoo.Libs;

namespace Gameplay.PVE.Skill
{
    /// <summary>
    /// 位移类技能
    /// </summary>
    public class Displacement:SkillCasterBase
    {
        public override void Start(float stateStartTime)
        {
            base.Start(stateStartTime);
            unit.Data.isApplyAnimationMovement = true;
            skill.unit.Data.moveState = 4;
            unit.Data.RemoveAstar();
            skill.unit.Transmit(ETransmitType.StartRootMotion);
        }

        public override void End()
        {
            unit.Data.isApplyAnimationMovement = false;
            skill.unit.Data.moveSpeed = 0;
            skill.unit.Transmit(ETransmitType.EndRootMotion);
            base.End();
        }
    }
}